package ch7;
//教师
public class Teacher {
    private String name,sex;
    private int age, seniority;

    public Teacher(String name, String sex, int age, int seniority) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.seniority = seniority;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getSeniority() {
        return seniority;
    }

    public void setSeniority(int seniority) {
        this.seniority = seniority;
    }
    public void selfIntroduce(){
        System.out.println("老师的姓名是："+this.name+
                "\n年龄是："+this.age+"\n性别是："+this.sex+
                "\n教龄是："+this.seniority);
    }
    public void giveLession(){
        System.out.println(this.name+"上课");

    }
}
